﻿
@model List<DealKhuyenMaiV2.com.Models.Product>

@{
    ViewBag.Title = "Filter";
    Layout = "~/Views/Shared/_MemberGuestLayout.cshtml";
}

<!DOCTYPE html>
<html>
<head>

</head>
<body>
    <div class="col_left">
        @for (int i = 0; i < Model.Count; i++)
        {
        <div class="box_deal_nho">
            	<div class="title_deal_nho">
                <span class="vitri_deal_nho">
                 @Html.ActionLink(Model[i].Catalogy.NameCatalogy, "Filter", "Home", new { IDCatalogy = Model[i].IDCatalogy }, null)
                </span> @Html.ActionLink(Model[i].NameProduct, "Details", new { idProduct = Model[i].IDProduct })</div>
                <div id="img_deal_nho">
                    <img src="@(((Model[i].Images.Count > 0) ? Model[i].Images.ElementAt(0).Path : "/Content/Images/no-images.png"))" width="320" height="223">
                    <div id="tem_nho">
                    	<div class="text_giam_nho">GIẢM</div>
                      
                        <div class="phantram_nho">@Math.Round(Model[i].Discount*100/Model[i].Price)%</div>
                    </div>
                    <div id="wrap_tg_phieu">
                        <script>
                            callTimeMini(@i);
                        </script>
                        <div class="thoigian_nho">
                            <span time="@(Math.Round((Model[i].Date_end - new DateTime(1970, 1, 1, 7, 0, 0)).TotalSeconds, 0))" id="kkcount-down-@(i)">
                            </span>
                        </div>
                        <div class="sophieumua_nho">
                            <span class="luotmua_nho">@Model[i].NumberOfPurchased</span> lượt mua</div>
                    </div>
                </div>
                <div id="gia_goc_deal_nho">
                	Giá gốc: @(Model[i].Price)đ<br>
					Tiết kiệm: @(Model[i].Discount)đ
                    <div id="arrow_nho">
                    	<div class="gia_deal_nho">@(Model[i].Price- Model[i].Discount)đ</div>
                        <div class="button_nho">
                            <input type="button" class="btn_mua_nho" onclick="location.href='@Url.Action("ShoppingCart", "Home", new { idProduct = Model[i].IDProduct })'"></div>
                        </div>
                    </div>
                </div>

            if (i % 2 == 0)
            {
			    <div style="width:20px; float:left"><img src="/Content/DefaultThemes/Images/space.gif" width="20px" height="20px"></div>            
            }     
        }
        
    </div>
</body>
</html>
